package com.gm.app.model;

import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(table = "contact", finders = { "findContactsByName" })
public class Contact {

	private String name;

	@ManyToOne(cascade = { CascadeType.DETACH, CascadeType.PERSIST,
			CascadeType.MERGE, CascadeType.REFRESH })
	@JoinColumn(name = "country_id", referencedColumnName = "id")
	private Country country;

	private String email;

	private String commercialPhone;

	private String homePhone;
}
